//面积测量菜单
import QtQuick 2.4
import QtQuick.Controls 1.3
import QtQuick.Controls.Styles 1.3
Item
{
    id:areaMeasurementSub
    visible:false
    width:areaMeasurementSubBg.width
    height:areaMeasurementSubBg.height
    z:1
    transform: Scale { origin.x: 0; origin.y: 0; xScale: root.x_enl-0.3;yScale: root.y_enl-0.3}
    Image
    {
        id:areaMeasurementSubBg
        source:"./切图/工具箱/距离测量/面积底子.png"
        MouseArea{id:areaMeasurementSubBgArea;anchors.fill:parent}
    }
    Image
    {
        id:areaMeasurementSubClose
        source:"./切图/排行/关闭.png"
        anchors.top:areaMeasurementSubBg.top
        anchors.right: areaMeasurementSubBg.right
        anchors.topMargin: 12
        anchors.rightMargin: 10
        MouseArea{id:areaMeasurementSubCloseArea;anchors.fill:parent
            onClicked:
            {
                areaMeasurementSub.visible = false
                earthView.slotMeasure(-1)
            }
        }
    }
    Text
    {
        id:measurementResultText02
        anchors.top: areaMeasurementSubBg.top
        anchors.topMargin: 54
        anchors.left: areaMeasurementSubBg.left
        anchors.leftMargin: 16
        text:"测量结果 :"
        font.pixelSize: 15
        color: "white"
        font.family: "微软雅黑"

    }
    Text
    {
        id:measurementResult02
        anchors.top: areaMeasurementSubBg.top
        anchors.topMargin: 54
        anchors.left: measurementResultText02.right
        anchors.leftMargin:5
        text:" ----- K㎡"
        font.pixelSize: 15
        color: "white"
        font.family: "微软雅黑"

    }
    Row
    {
        anchors.left: areaMeasurementSubBg.left
        anchors.leftMargin: 32
        anchors.bottom: areaMeasurementSubBg.bottom
        anchors.bottomMargin: 14
        spacing: 50
        Image
        {
            id:calculation02
            source:calculationArea02.containsPress ? "./切图/工具箱/距离测量/计算点击.png" :"./切图/工具箱/距离测量/计算.png"
            //            height: 170
            MouseArea{id:calculationArea02;anchors.fill:parent
                onClicked:
                {

                    //面积调用
                    var z = Math.floor(parseFloat(earthView.slotGetMeasureResult()) *1000)/1000
                    measurementResult02.text =   " " + z + " k㎡"
                }
            }
        }

        Image
        {
            id:eliminate02
            source:eliminateArea02.containsPress ? "./切图/工具箱/距离测量/清除点击.png" :"./切图/工具箱/距离测量/清除.png"
            //            height: 170

            MouseArea{id:eliminateArea02;anchors.fill:parent
                onClicked:
                {
//                    //th3dView.slotClearScene()
                    earthView.slotClearMeasureResult()
                    measurementResult02.text = " ----- k㎡"
                }
            }
        }

    }

}
